@import "variables";

* {
  font-family: "Times New Roman", Arial, "Microsoft YaHei", "黑体", serif;
}

// font color
.text-primary {
  color: $--color-primary !important;
}

.text-success {
  color: $--color-success !important;
}

.text-info {
  color: $--color-info !important;
}

.text-warning {
  color: $--color-warning !important;
}

.text-danger {
  color: $--color-danger !important;
}

// background color
.bg-primary {
  color: #ffffff;
  background-color: $--color-primary !important;
}

.bg-success {
  background-color: $--color-success !important;
}

.bg-info {
  background-color: $--color-info !important;
}

.bg-warning {
  background-color: $--color-warning !important;
}

.bg-danger {
  background-color: $--color-danger !important;
}

// float
.pull-left {
  float: left !important;
}

.pull-right {
  float: right !important;
}

// clearfix
.clearfix {
  &:before,
  &:after {
    content: " ";
    display: table;
  }
  &:after {
    clear: both;
  }
}

// make a block center
.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.text-center {
  text-align: center;
}

.justify {
  text-align: justify;
  &:after {
    content: "";
    padding-left: 100%;
    display: inline-block;
  }
}

.word-not-break-line {
  &,
  .cell {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

.show-sm-ib {
  display: none;
}

.hide-sm-ib {
  display: inline-block;
}

.common-layout {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  #sidebarCheckbox {
    display: none;
  }
  .common-sidebar {
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 140px;
    overflow: auto;
    transition: all .3s;
    background-color: rgba(255, 255, 255, .8);
    border-right: 1px solid #dddddd;
    .title {
      height: 62px;
      line-height: 62px;
      text-align: center;
      font-size: 14px;
      font-weight: 700;
      color: #333333;
      .icon {
        margin-right: 10px;
      }
    }
    .list {
      margin: 0;
      padding: 0 0 0 20px;
      list-style-type: none;
      font-size: 14px;
      font-weight: 700;
      color: #666;
      .item {
        height: 40px;
        line-height: 40px;
        transition: color .3s;
        .fa {
          margin-right: 10px;
        }
        a {
          text-decoration: none;
          color: #6b757b;
          &:hover {
            color: $--color-primary;
          }
        }
        .router-link-active {
          color: $--color-primary;
        }
      }
    }
  }
  .common-main-container {
    position: absolute;
    top: 0;
    left: 140px;
    right: 0;
    bottom: 0;
    padding: 10px;
    overflow: auto;
    transition: left .3s;
    .common-container {
      max-width: 720px;
      margin: auto;
      > .title {
        height: 42px;
        line-height: 42px;
        padding-left: 16px;
        margin-bottom: 10px;
        font-size: 15px;
        box-shadow: 0 2px 4px 0 rgba(121, 146, 185, .54);
        border-radius: 4px;
        color: #666666;
        background-color: #fff;
      }
    }
  }
}

.el-dialog__wrapper {
  &[size="300px"] {
    .el-dialog {
      max-width: 300px !important;
    }
  }
  &[size="400px"] {
    .el-dialog {
      max-width: 400px !important;
    }
  }
  &[size="500px"] {
    .el-dialog {
      max-width: 500px !important;
    }
  }
  &[size="600px"] {
    .el-dialog {
      max-width: 600px !important;
    }
  }
  .el-dialog {
    width: 768px !important;
  }
}

@media screen and (max-width: 768px) {
  .show-sm-ib {
    display: inline-block;
  }
  .hide-sm-ib {
    display: none;
  }
  .common-layout {
    #sidebarCheckbox {
      &:checked {
        ~ .common-sidebar {
          left: 0;
        }
        ~ .common-main-container {
          //left: 140px;
        }
      }
    }
    .common-sidebar {
      left: -140px;
      background-color: #fff;
      //border-right: 1px solid #dddddd;
    }
    .common-main-container {
      left: 0;
    }
  }

  .el-dialog__wrapper {
    .el-dialog {
      width: 100% !important;
    }
  }
}

.fa {
  margin-right: 5px;
}

.el-input-number__decrease .el-icon-minus,
.el-input-number__increase .el-icon-plus {
  line-height: 38px;
}

[role=alert].el-message {
  z-index: 2040;
}

.el-table__empty-block {
  height: auto !important;
}

//.geetest_holder.geetest_wind.geetest_detect {
//  width: 100% !important;
//  min-width: 0;
//  overflow: hidden;
//}
